﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FJASPX.Service;
using FJASPX.Framwork.Helper;
using FJASPX.Framwork.Constant;
namespace PlugNT.Cms.Web.Home.Control
{
    public partial class Style : System.Web.UI.UserControl
    {
        public IUserService iUserService { get; set; }

        public FJASPX.Domain.User user;

        public IStoreService iStoreService { get; set; }

        public FJASPX.Domain.Store store;

        /// <summary>
        /// 皮肤
        /// </summary>
        public string Skin = "Default";

        private void Filter()
        {
            user = iUserService.Get(Request.QueryString["User"].ToInt());
            store = iStoreService.GetByUser(user);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Filter();
            }
            if (!store.IsNull() && store.Skin != null)
            {
                Skin = store.Skin;
            }
        }

    }
}